package eg.ci.mvn.service.api.model.param;


import cn.hutool.bloomfilter.bitMap.IntMap;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;


@Data
@NoArgsConstructor
@Schema(description =  "ParkingCardParam-参数")
public class ParkingCardParam {

    @Builder
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "ParkingCardParam-Region-CardGroup-卡组卡证")
    public static class CardGroup {
        @Schema(description = "标识")
        private String id;

        @Schema(description = "卡证名称")
        private String name;

        @Schema(description = "卡证类型 1-临停 2-访客车 3-白名单 4-黑名单 5-月卡", example = "420103000001")
        private Integer classify;

        @Schema(description = "区域编码")
        private String regionCode;

        @Schema(description = "套餐费用")
        private CardRole cardRole;

        @Schema(description = "计费索引")
        private CardFee cardFee;

        @Schema(description = "通行规则")
        private List<AccessRule> accessRules;
    }

    @Builder
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "ParkingCardParam-CardFeeRole-套餐费用")
    public static class CardRole {
        @Schema(description = "标识")
        private String id;

        @Schema(description = "描述")
        private String desc;
    }

    @Builder
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "ParkingCardParam-CardFeeRole-计费费用")
    public static class CardFee {
        @Schema(description = "标识")
        private String id;

        @Schema(description = "描述")
        private String desc;
    }


    @Builder
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "ParkingCardParam-AccessRule-通行规则")
    public static class AccessRule {
        @Schema(description = "标识")
        private String id;

        @Schema(description = "通行索引")
        private String accessRuleId;

        @Schema(description = "通道口编码", example = "42010300000101")
        private String gateCode;

        @Schema(description = "生效时间")
        private Integer startTime;

        @Schema(description = "过期时间")
        private Integer endTime;

        @Schema(description = "日历 0-每天 1-工作 2-非工作日")
        private Integer calendar;

        @Schema(description = "车牌颜色组合 1-蓝牌 3-黄牌 6-绿牌 7-白牌 8-黑牌")
        private IntMap colorAction;

        @Schema(description = "是否需要人工确认 0-不需要 1-需要")
        private Integer isConfirm;

        @Schema(description = "备注")
        private String remark;
    }
}
